﻿using System;
using System.Windows.Data;
using BizControl.Library.BusinessObjects.Marks;

namespace BizControl.Presentation.ActivityEditModule.Converters
{
  public class ConditionTypeToElementsSourceConverter : IValueConverter
  {
    #region IValueConverter Members

    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      var condition = value as MarkConditionBO;
      if (condition != null)
        return condition.GetSourceElements();
      return null;
    }

    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      return null;
    }

    #endregion
  }
}
